<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    //从数组和对象中提取值，对变量进行赋值
    //数组解构
    const TEAM = ['swk','zbj','blm']
    let[a,b,c] = TEAM
    console.log(a)
    console.log(b)
    console.log(c)

    //对象结构
    const person = {
      name:'tom',
      age:18,
      sayName:function(){
        console.log(name)
      }
    }

    let{name,age,sayName} = person
    console.log(name)
    sayName()
  </script>
</body>
</html>